home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 145
/
145.d81
/
t.disc c
< prev
next >
Wrap
Text File
|
2022-08-26
|
9KB
|
357 lines
Heaven in the net
an unedited excerpt
of IRC on #c-64
by Mike Gordillo
Note from Jeff: Ooops! I, er,
kinda fixed a few spelling and
capitalization errors -- so this
piece is "mostly unedited."
As a self-proclaimed "demo
freak", the following transcript
(largely unedited) represents one of
the most interesting discussions
concerning C-64 that I have ever
witnessed on IRC (Internet Relay
Chat) or any other venue. I present
this to the reader in the hopes of
encouraging further participation and
patronage of IRC channel #c-64. We
begin in the middle of a dissection
of VIC chip internals by Firefoot.
[Mike:] Can anything go on
system-wise when a bad line is being
"serviced" so to speak?
[Firefoot:] "BAD" lines are just
another way of specifying the lines
where the VIC steals 40 cycles from
the CPU to do a screen refresh. You
can delay the bad lines, and push
the whole screen down (FLD). You can
force them to occur every line (FLI).
You can turn them off (blanking the
screen). You can move them
horizontally (VSP).
[Firefoot:] The CPU isn't halted,
it is busy helping the VIC chip out.
Any code that you are executing is
"halted".
[Waveform:] I never understood
VSP. I thought the VIC brought the
CPU off-line so it could sweep in all
the data for the bitmap in those 40
cycles (for the next 8 lines).
[Firefoot:] No, nothing can go on
system-wise when a bad line is being
serviced, not in terms of the CPU
anyway.
[Firefoot:] Wave - I guess that
would be functionally identical. I
guess it depends on whether or not
you consider the bus part of the
cpu.
[Waveform:] The VIC reads its
data independent of the CPU, but...I
still never understood VSP. =)
[Mike:] Yeah, but the CPU and the
VIC chip can't share the bus at
once.
[Firefoot:] I never understood
VSP well. There is something about
how tricky stuff with $d011 can cause
the VIC to think it has started a new
scanline, when, infact, it has not.
[Mike:] Well..explain FLD for me
then, Firefoot. :)
[Waveform:] FLD is easy but FLI
is not as easy and VSP scares me.
[Firefoot:] I've coded VSP, but
never understood it either. However
I do understand FLD. You just keep
playing with $d011 (every scan line)
so that the VIC keeps thinking that
the [NEXT] scan line is the one where
it is supposed to do the refresh of
screen memory. When you stop doing
this, it starts drawing the screen
where it left off.
[Waveform:] Exactly, FLD is very
easy to understand but what about
VSP?
[Firefoot:] Actually, I stumbled
across VSP when coding FLI.
[Waveform:] FLI is essentially
the same thing as FLD. Except that
instead of making the VIC think the
next scan line is where its supposed
to draw the screen, FLI makes the VIC
think the current line is the one to
draw on - but you do it on every
line.
[Firefoot:] Well, wave, think of
VSP as the same thing as FLD except
instead of pushing the screen down
scan lines, you push it across
cycles. Also, try changing the delay
at the beginning of an FLI routine,
and you will see the screen shift
over... voila, vsp!
[Waveform:] Well, I just recently
got a stable raster (double interrupt
style) so I haven't actually done
anything that specific (FLI for
example) though FLD is very
forgiving. You can do nifty FLD with
virtually no timing at all.
[Mike:] No timing for FLD? ok...
Why am *I* having such a hard time
putting sprites over FLD then!
[Firefoot:] FLI can be made very
forgiving as well (no stable raster
needed).
[Waveform:] Firefoot: It actually
uses the CPU's Phi cycle as well as
the VIC Phi cycle.
[Waveform:] Fire: That is
probably what you are remembering.
[Firefoot:] Well, with FLI it
*is* nice to use a stable interrupt.
I use the double raster method as
well, always seemed the cleanest to
me.
[Firefoot:] Oh, it is not easy to
put sprites over FLD. You have to
make sure that your delay each line
is exactly correct. Very weird
code... I did that and sprite over
FLI with almost the same routine.
ugh.
[Firefoot:] Wave: That's
*exactly* what I am remembering.
[Waveform:] Fire: the phi thing?
[Mike:] When the FLD bounces
down...there -seems- to be a screen
area behind it!
[Firefoot:] Mike, basically what
I did is constructed a section of
unrolled FLI/FLD code, and played
with the delay instructions each time
I moved the sprites so that the
timing was always correct.
[Firefoot:] Wave, yes, the phi
thing. From the appendix about the
vic chip. It was very informative.
[Mike:] Ok...I've heard these
$xfff addies pop up over and over and
I guess that explains why the some of
my pics have those lines behind the
FLD!
[Firefoot:] Mike, the area behind
the FLD is taken from the last byte
of the video bank ($3fff, $7fff,
$bfff, or $ffff). It is also what
you see when you open up the
borders.
[Mike:] Gawd, those annoying
lines... I couldn't figure out where
they were coming from.
[Waveform:] Make VICBASE+$3fff
equal to 0... or is it $FF?... and
the lines will vanish.
[Mike:] I also ran a few old
demos..and someone (tfo?) was
blabbing about how this border was
opened up via FLD and the other one
wasn't..etc., etc? How does FLD open
up a border?
[Style:] Is it true it becomes
+$x9ff when extended color mode is
on?
[Firefoot:] Style, I have never
heard that, but I have never used
extended color mode while doing any
of those.
[Firefoot:] Mike, the "fld
opening up the side borders" thing
basically uses the stable raster
created with the fld to open the side
borders. Easier than other methods,
like the double raster method, but
sloppy, in my opinion. besides, you
can't get text or gfx....
[Mike:] Firefoot, that is all
well and good..but "How do you open
up the nice sideborders?...period"...
Apparently, you are telling me that
the FLD is used as an "index" in this
case.
[Firefoot:] Oh... well... Do you
know how to open the top/bottom
borders (the theory behind it)?
[Waveform:] Well, if you time it
right, you make the screen 38 columns
instead of 40 right at the last cycle
on the raster.
[Mike:] Only thing I know how to
do is 38/40 column it... :D
[Waveform:] Then on the next
cycle, the vic thinks it has already
started displaying the border... so
it doesn't start.
[Style:] Which location is the
gfx behind an open side border???
[CRoth:] Waveform: I've tried to
do that, failed miserably.
[Waveform:] Style: VICBASE +
$3fff
[Waveform:] Anytime you open a
border or open screen space and the
vic doesn't have normal info to fill
it will it takes the last byte in its
address space and sticks it in
there.
[Firefoot:] Croth: Did you make a
stable raster first? Without that
you will fail miserably.
[CRoth:] Firefoot: I couldn't
figure it out. Had a friend of mine
explain it to me, he was a genius
when it came to that. :)
[Mike:] What about TWO FLD's? I
could swear I have seen one FLD
bounce and then another bounce the
screen behind it! Is this lunacy on
my part?
[Waveform:] No it isn't, you stop
one FLD...The VIC starts
drawing...then later on, you start
another FLD... You get two open
spaces on your screen!
[Style:] And if you can be
bothered, you can make a FLD on every
line & slice the picture up :D
[Waveform:] FLD make the whole
screen data move down and up. You can
achieve similar effects with
sprites... just make all the Y coords
go up and down.
[Mike:] Ok..can you limit how
WIDE the FLD is ? Or is it always
full-screen?
[Waveform:] You can't FLD on
every line... can you? doesn't that
pooch your pic? I've seen every eight
lines... but every line?!?! I
thought that if you FLD after the VIC
draws on the next line, you get a
STRETCH, don't you?
[Style:] Wave, check out "Finely
Sliced" by Christopher Jam.
[Firefoot:] Mike, I think the FLD
is always fullscreen wide. I can't
see how it wouldn't be.
[Firefoot:] Same here Wave, I've
only seen every 8 lines as well.
Perhaps you could do some sort of
weird cross between FLI and FLD to
get every line. Of course, the